package com.cbs.android.widget.countdownview.sample;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;

import com.cbs.android.widget.countdownview.CountDownView;

public class MainActivity extends AppCompatActivity implements CountDownView.CountDownListener {
    private static final String TAG = MainActivity.class.getName();
    private CountDownView countDownView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        countDownView = (CountDownView) findViewById(R.id.countdownview);
    }

    public void start(View view) {
        countDownView.start(3000, this);
    }

    public void stop(View view) {
        countDownView.stop();
    }

    public void reset(View view) {
        countDownView.reset();
    }

    public void pause(View view) {
        countDownView.pause();
    }

    public void resume(View view) {
        countDownView.resume();
    }

    @Override
    public void onFinish(CountDownView view) {
        Log.e(TAG, "111");
    }
}
